package com.study.mvc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Description: SpringMVC的视图
 */
@Controller
public class ViewController {

    // 1）ThymeleafView
    @RequestMapping("/testThymeleafView")
    public String testThymeleafView() {
        return "success";
    }

    // 2）转发视图
    @RequestMapping("/testForward")
    public String testForward() {
        return "forward:/testThymeleafView";
    }

    // 3）重定向视图
    @RequestMapping("/testRedirect")
    public String testRedirect() {
        return "redirect:/testThymeleafView";
    }

}
